package com.example.controller;

import com.example.entity.Course;
import com.example.entity.CourseInfo;
import com.example.mapper.CourseMapper;
import com.example.service.CourseService;
import com.example.service.impl.CourseServiceImpl;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@Slf4j
@CrossOrigin
@RestController
//@RequestMapping("course")
public class CourseController {
    @Autowired
    private CourseMapper CourseMapper;
    @Autowired
    private CourseService courseService;

    @ApiOperation("课程")
    @RequestMapping("/costs")
    // @PostMapping("save-course-info")
    public List<Course> getCourse() {
        System.out.println(("---- selectAll method test ------"));
        List<Course> list = CourseMapper.selectList(null);
        return list;
    }
    }
